pp108 : Create Case

Create Case

This API is used to execute a Case model. 

ResourceURI
v1/cases
Request Type

HTTP POST

HTTP Header Parameters

Parameter

Description

Accepted Input Values

SAMLart

The SAML artifact received after authentication. Refer to Login for more information on how to authenticate.
HTTP Payload

The POST accepts the payload content only in the XML format. The request format is as follows:

Sample POST Request
<case_parameters xmlns="http://schemas.cordys.com/casemanagement/execution/1.0">
    <model>case/ClaimRequest</model>
    <casedata>
        <data xmlns:claim="http://schemas.cordys.com/claim" name="claim:claim">
            <claim:claim>
                <claim:claimd>CLM120025</claim:claimd>
                <claim:type>Vehicle</claim:type>
                <claim:vehicle>Car</claim:vehicle>
                <claim:date>8/3/2012</claim:date>
                <claim:status>Created</claim:status>
            </claim:claim>
        </data>
        <data xmlns:case="http://schemas.cordys.com/casemanagement/1.0" name="case:casevariables">
            <case:casevariables>
                <case:User type="User">cn=Peter,cn=organizational users,o=system,cn=cordys,cn=BOP4dot2,o=vanenburg.com</case:User>
                <case:Role type="Role">cn=Senior Manager,cn=organizational roles,o=system,cn=cordys,cn=BOP4dot2,o=vanenburg.com</case:Role>
                <case:Team type="Team">Audit</case:Team>
                <case:Worklist type="Roles">Organization/My Work List</case:Worklist>
                <case:DueTimeSLA type="Duration">PT10M</case:DueTimeSLA>
            </case:casevariables>
        </data>
    </casedata>
</case_parameters>
Request Parameters

Parameter

Description

Mandatory

Accepted Input Values

casedata

Refers to the data set that requires to be sent as input to the Case instance. The Case data set consists of:

  • data element to pass Case variables values
    The Case variables are considered as parameters to a Case model. Using the Case variables, you can dynamically pass values for User, Role, Team, Worklist, Dispatch algorithm, and duration properties. To pass the Case variables, the name attribute value must be defined as casevariables
    For every Case variable defined in a Case model, the corresponding element with the variable name must be added as a child element to the casevariables element. The casevariables element serves as the root of all the Case variables. The type attribute refers to the Case variable type. Refer to the table below, for a list of the Case variable types, values, and the accepted input values.
  • data element to pass Case data model
    The Case data model refers to the information, which is configured for a Case model and is available across all the activities of the Case model. To pass the values to the Case data model, the name attribute value must be the name of the schema element configured in the Case model. 
    In the above sample request, the name of the Case related data is defined as PatientInfo. The child elements of the data element must refer to the instance XML of the XML Schema element with values.

No

 

model

Refers to the name of the Case Model

Yes

Qualified name of the Case model

space

Refers to the place from which the deployed Case models are selected for execution

Note: This parameter is currently deprecated. If it is not provided, the Organization space is considered by default. If the expected model is not found in the organization space, then the Shared space is considered automatically.

No

You can provide any one of the following values:

  • ISV - If the Case model is deployed in the Shared space.
  • Organization - If the Case model is deployed in the Organizational space.
Sample Response
<CreateCaseResponse>
    <case_instance_id>89C1425D-09E4-11E3-E859-BE7ACE8093A1</case_instance_id>
    <active_states>
        <state name="Default State" id="RootCaseModelState">89C1425D-09E4-11E3-E859-BE7ACE80D3A1</state>
        <state name="Registration" id="00215A60-3EB8-11E2-EF7D-3DBF3116F586">89C1425D-09E4-11E3-E859-BE7ACE80F3A1</state>
    </active_states>
</CreateCaseResponse>